package core.units;
import java.awt.*;

import core.*;
import core.actions.*;
import core.units.*;
import core.weapons.*;

public class HeroUnit extends Unit{
	
	
	public HeroUnit(int x1, int y1, Player m){
		super(x1, y1, m);
		health=1000;
		maxHealth=1000;
		speed=300;
		isSelectable = true;
	}
	
	
	/*public void autoFire(){
		attackTimer++;
		if(attackTimer>=100){
			
			main.attacks.add(new Bullet(x+20, y, master, angleTo(findNearestEnemy()), 15, 5000, 0.03, 400000));
			main.attacks.add(new Bullet(x-20, y, master, angleTo(findNearestEnemy()), 15, 5000, 0.03, 400000));
			main.attacks.add(new Bullet(x, y-20, master, angleTo(findNearestEnemy()), 15, 5000, 0.03, 400000));
			//main.attacks.add(new Missile(x/FACTOR, y/FACTOR-20, team, player, master, main, 0.75));
			//main.attacks.add(new Mortar(x/FACTOR, y/FACTOR, 300, 100, team, player, master, main));
			attackTimer=0;
		}
	}*/
	public void takeDamage(int dmgIn){
		health=health-dmgIn;
		if(health<=0){
			alive=false;
			
			
		}
	}
}
